<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    wx.config({
        debug: false,
        appId: '{$signPackage.appId}',
        timestamp: '{$signPackage.timestamp}',
        nonceStr: '{$signPackage.nonceStr}',
        signature: '{$signPackage.signature}',
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage']
    });    
    wx.ready(function () {
    	    wx.checkJsApi({
    	      jsApiList: [
    	        'getNetworkType',
    	        'previewImage',
    	        'onMenuShareTimeline',
    	        'onMenuShareAppMessage',
    	        'onMenuShareQQ',
    	        'onMenuShareWeibo'
    	      ],
    	      success: function (res) {
    	      }
    	    });
    	  var shareData = {
    	    title: '{$shareinfo.malias}',
    	    desc: '{$shareinfo.description}',
    	    link: '{$shareinfo.geturl}',
    	    imgUrl: '{$shareinfo.thumbimg}',
    	    trigger: function (res) {

    	    },
    	    success: function (res) {

    	    },
    	    cancel: function (res) {

    	    },
    	    fail: function (res) {

    	    }
    	  };
    	  wx.onMenuShareAppMessage(shareData);
    	  wx.onMenuShareTimeline(shareData);
    	  wx.onMenuShareQQ(shareData);
    	  wx.onMenuShareWeibo(shareData);
    	});
    	wx.error(function (res) {
    	  alert(res.errMsg);
    	});
</script>